package com.exchange.View;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.ListView;
import com.exchange.Controller.ExchangeDataService;
import com.exchange.Controller.a;
import com.exchange.Public.ExchangeConstants;
import com.exchange.Public.h;
import com.exchange.View.a.a;
import com.exchange.b.a;
import java.util.List;

public class EmbededContainer
{
  private View a;
  private ListView b;
  private Context c;
  private ExchangeDataService d;
  private List<a> e;
  public int mType = 8;

  public EmbededContainer(Context paramContext, ViewGroup paramViewGroup, ListView paramListView, ExchangeDataService paramExchangeDataService)
  {
    this.a = paramViewGroup;
    this.c = paramContext;
    this.b = paramListView;
    this.d = paramExchangeDataService;
    h localh = new h(this.c, paramViewGroup);
    if (ExchangeConstants.show_progress_wheel)
      localh.a();
    A localA = new A(this, localh);
    this.d.requestDataAsyn(this.c, localA);
  }

  public void setInteraction(int paramInt)
  {
    int i;
    new ah(this.b, this.c, a.p(this.c), false, this.e, 8);
    new a(this.c, 0, this.e, this.mType, 1, 0).start();
    if (ExchangeConstants.CONTAINER_LIST_COUNT > this.e.size())
      i = this.e.size();
    while (true)
    {
      if (!(ExchangeConstants.CONTAINER_AUTOEXPANDED))
      {
        ViewGroup.LayoutParams localLayoutParams = this.a.getLayoutParams();
        localLayoutParams.height = com.exchange.Public.h.a(i * (1 + ExchangeConstants.CONTAINER_HEIGHT), this.c);
        this.a.setLayoutParams(localLayoutParams);
      }
      return;
      i = ExchangeConstants.CONTAINER_LIST_COUNT;
    }
  }
}